/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-12-15
*/
package com.rzico.article.entity;

import com.alibaba.fastjson.JSON;
import com.rzico.article.model.BillFareMeta;
import lombok.Data;
import java.util.Date;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * <pre>
 *   百道名菜数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@JsonIgnoreProperties(value = {"handler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "wx_bill_fare")
public class BillFare{
    @Id
    @ApiModelProperty(value = "" )
    protected Long id;

    @ApiModelProperty(value = "创建日期" )
    protected java.util.Date createDate;

    @ApiModelProperty(value = "修改日期" )
    protected java.util.Date modifyDate;

    @ApiModelProperty(value = "菜谱名称" )
    protected String name;

    @ApiModelProperty(value = "副标题" )
    protected String subTitle;

    @ApiModelProperty(value = "缩略图" )
    protected String thumbnail;

    @ApiModelProperty(value = "菜谱介绍" )
    protected String content;

    @ApiModelProperty(value = "轮播图及视步({video:视频url,images:[图片url]})" )
    protected String meta;

    @ApiModelProperty(value = "分类id")
    protected Long billFareCategoryId;

    @ApiModelProperty(value = "口味" )
    protected String flavor;

    @ApiModelProperty(value = "烹任时长" )
    protected String timeLen;

    @ApiModelProperty(value = "上手难度" )
    protected Integer difficulty;

    @ApiModelProperty(value = "几人做过" )
    protected Integer love;

    @JsonIgnore
    @ApiModelProperty(value = "是否删除" ,hidden = true )
    protected Boolean deleted;

    @JsonIgnore
    @ApiModelProperty(value = "创建者" ,hidden = true )
    protected String createBy;

    @JsonIgnore
    @ApiModelProperty(value = "更新者" ,hidden = true )
    protected String modifyBy;



    public BillFareMeta getBillFareMeta() {
        if (getMeta()!=null) {
            return JSON.parseObject(getMeta(),BillFareMeta.class);
        } else {
            return null;
        }
    }

    public void setBillFareMeta(BillFareMeta value) {
        if (value!=null) {
            setMeta(JSON.toJSONString(value));
        } else {
            setMeta(null);
        }
    }
}
